﻿<%@ Register TagPrefix="ucCommon" TagName="Common" Src="../Common/Inc/Common.ascx" %>
<%@ Register TagPrefix="ucTop" TagName="Top" Src="../Common/Inc/Top.ascx" %>
<%@ Register TagPrefix="ucMenu" TagName="Menu" Src="../Common/Inc/Menu.ascx" %>
<%@ Register TagPrefix="ucTabTitle" TagName="TabTitle" Src="../Common/Inc/TabTitle.ascx" %>
<%@ Register TagPrefix="ucCopyright" TagName="Copyright" Src="../Common/Inc/Copyright.ascx" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Crd2012r.aspx.cs" Inherits="Updms.Crd.Crd2012r" %>
<%@ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms" TagPrefix="chartfx7" %>
<%@ Register Assembly="ChartFX.WebForms.Adornments" Namespace="ChartFX.WebForms.Adornments"	TagPrefix="chartfxadornments" %>
<%@ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms.Galleries" TagPrefix="chartfx7galleries" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>▒ UPDMS [Crd2012r] ▒▒▒▒▒▒▒▒▒▒</title>
<ucCommon:Common id="Common" runat="server"></ucCommon:Common>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" id="ScriptManager1" EnableScriptGlobalization="true"></asp:ScriptManager>

<table id="table_frame">
	<tr>
		<td id="top_area" colspan="2">
			<!-- Top 시작 -->
			<ucTop:Top id="Top" runat="server"></ucTop:Top>
			<!-- Top 끝 -->	
		</td>
	</tr>
	<tr>
		<td id="menu_area">
			<!-- 메뉴 시작 -->
			<ucMenu:Menu id="Menu" runat="server"></ucMenu:Menu>
			<!-- 메뉴 끝 -->
		</td>
		<td id="contents_area">
			<!-- 제목 시작 -->
			<ucTabTitle:TabTitle id="TabTitle" TagPrefixs="Crd2012r" runat="server"></ucTabTitle:TabTitle>
			<!-- 제목 끝 -->
			<!-- AJAX 시작 -->
			<asp:UpdatePanel ID="UpdatePanel1" runat="server">
			<ContentTemplate>
			<!-- 버튼 시작 -->
			<div class="button_area">
				<asp:linkbutton id="ibtn_chart" Text="챠트" runat="server" CssClass="ibtn ibtn_chart" OnClick="ibtn_chart_Click" OnClientClick="return chkSearch()"></asp:linkbutton>
			</div>
			<!-- 버튼 끝 -->
			<!-- 검색 시작 -->
			<table class="table_search">
				<tr>
					<td class="lbl"><a href="javascript:void(0);" title="전체선택/해제" onclick="checkBoxCheckTable('cbl_search_card_cd')"><u><asp:Literal id="ltr_search_card_cd" Text="카드" runat="server" /></u></a></td>
					<td class="ctl" colspan="5"><asp:CheckBoxList id="cbl_search_card_cd" runat="server" RepeatDirection="Horizontal" CssClass="cbl_flow"></asp:CheckBoxList></td>
				</tr>
				<tr>
					<td class="lbl" width="11%"><asp:Literal id="ltr_search_region" Text="검색기간" runat="server" /></td>
					<td class="ctl" width="44%">
						<asp:dropdownlist id="ddl_search_from_year" runat="server"></asp:dropdownlist><asp:dropdownlist id="ddl_search_from_month" runat="server">
										<asp:ListItem Value="01">01</asp:ListItem>
										<asp:ListItem Value="02">02</asp:ListItem>
										<asp:ListItem Value="03">03</asp:ListItem>
										<asp:ListItem Value="04">04</asp:ListItem>
										<asp:ListItem Value="05">05</asp:ListItem>
										<asp:ListItem Value="06">06</asp:ListItem>
										<asp:ListItem Value="07">07</asp:ListItem>
										<asp:ListItem Value="08">08</asp:ListItem>
										<asp:ListItem Value="09">09</asp:ListItem>
										<asp:ListItem Value="10">10</asp:ListItem>
										<asp:ListItem Value="11">11</asp:ListItem>
										<asp:ListItem Value="12">12</asp:ListItem>
									</asp:dropdownlist>&nbsp;~&nbsp;<asp:dropdownlist id="ddl_search_to_year" runat="server"></asp:dropdownlist><asp:dropdownlist id="ddl_search_to_month" runat="server">
										<asp:ListItem Value="01">01</asp:ListItem>
										<asp:ListItem Value="02">02</asp:ListItem>
										<asp:ListItem Value="03">03</asp:ListItem>
										<asp:ListItem Value="04">04</asp:ListItem>
										<asp:ListItem Value="05">05</asp:ListItem>
										<asp:ListItem Value="06">06</asp:ListItem>
										<asp:ListItem Value="07">07</asp:ListItem>
										<asp:ListItem Value="08">08</asp:ListItem>
										<asp:ListItem Value="09">09</asp:ListItem>
										<asp:ListItem Value="10">10</asp:ListItem>
										<asp:ListItem Value="11">11</asp:ListItem>
										<asp:ListItem Value="12">12</asp:ListItem>
									</asp:dropdownlist>&nbsp;<asp:linkbutton id="sbtn_6_m" runat="server" ToolTip="6개월" OnClick="sbtn_6_m_Click"><img src="../Common/Images/calendar_6m.gif" align="top"></asp:linkbutton><asp:linkbutton id="sbtn_12_m" runat="server" ToolTip="12개월" OnClick="sbtn_12_m_Click"><img src="../Common/Images/calendar_12m.gif" align="top"></asp:linkbutton><asp:linkbutton id="sbtn_all_m" runat="server" ToolTip="전체" OnClick="sbtn_all_m_Click"><img src="../Common/Images/calendar_all.gif" align="top"></asp:linkbutton>
					</td>
					<td class="lbl" width="11%" title="본사지원, 기타(통계미반영)"><asp:Literal id="ltr_support_yn" Text="미반영제외" runat="server" /></td>
					<td class="ctl" width="11%"><asp:CheckBox id="cb_support_yn" runat="server"></asp:CheckBox></td>
					<td class="lbl" width="11%"><asp:Literal id="ltr_search_chart_width" Text="넓이" runat="server" /></td>
					<td class="ctl" width="11%"><asp:dropdownlist id="ddl_search_chart_width" runat="server" CssClass="ddl"></asp:dropdownlist></td>
				</tr>
				<tr>
					<td class="lbl"><a href="javascript:void(0);" title="전체선택/해제" onclick="checkBoxCheckTable('cbl_search_account')"><u><asp:Literal id="ltr_search_account" Text="계정" runat="server" /></u></a></td>
					<td class="ctl" colspan="5"><asp:CheckBoxList id="cbl_search_account" runat="server" RepeatDirection="Horizontal" Width="100%" CssClass="cbl_flow" RepeatColumns="7"></asp:CheckBoxList></td>
				</tr>
			</table>
			<!-- 검색 끝 -->
			<!-- 챠트1 시작 -->
			<table id="table_chart_1" class="default" runat="server">
				<tr>
					<td><div class="sub_title_icon"><asp:Literal id="ltr_stitle_total_chart" Text="결제총액챠트" runat="server" /></div></td>
				</tr>
				<tr>
					<td class="td_box">
						<chartfx7:Chart ID="chart_mline_total" runat="server" Height="480px" Palette="ChartFX6.ChartFX6" Width="1000px" ImageSettings-Interactive="False">
							<AxisY Title-Text="금액 (원)">
								<Grids Major-Style="Dash" Interlaced="True"></Grids>
								<LabelsFormat CustomFormat="###,###,##0" />
							</AxisY>

							<AxisX Title-Text="">
							<Grids Major-Visible="False"></Grids>
							</AxisX>

							<AllSeries PointLabels-Visible="True" Gallery="Bar"></AllSeries>

							<LegendBox ContentLayout="Near" Dock="Top"></LegendBox>

							<MainPane AxisY-Title-Text="금액 (원)"></MainPane>
							<SpecialObjects>
								<chartfxadornments:SimpleBorder AssemblyName="ChartFX.WebForms.Adornments" Color="Transparent"
									Type="None">
								</chartfxadornments:SimpleBorder>
								<chartfxadornments:GradientBackground AssemblyName="ChartFX.WebForms.Adornments"
									ColorFrom="Transparent" EffectArea="0">
								</chartfxadornments:GradientBackground>
								<chartfx7galleries:Bar>
								</chartfx7galleries:Bar>
							</SpecialObjects>
							<Series>
								<chartfx7:SeriesAttributes />
								<chartfx7:SeriesAttributes />
								<chartfx7:SeriesAttributes />
							</Series>
						</chartfx7:Chart>
					</td>
				</tr>
			</table>
			<!-- 챠트1 끝 -->
			<br>
			<!-- 챠트2 시작 -->
			<table id="table_chart_2" class="default" runat="server">
				<tr>
					<td><div class="sub_title_icon"><asp:Literal id="ltr_stitle_monthly_chart" Text="월별차액챠트" runat="server" /></div></td>
				</tr>
				<tr>
					<td class="td_box">
						<chartfx7:Chart ID="chart_mline_diff" runat="server" Height="300px" Palette="ChartFX6.ChartFX6" Width="1000px" ImageSettings-Interactive="False">
							<AxisY Title-Text="금액 (원)">
								<Grids Major-Style="Dash" Interlaced="True"></Grids>
								<LabelsFormat CustomFormat="###,###,##0" />
							</AxisY>

							<AxisX Title-Text="">
							<Grids Major-Visible="False"></Grids>
							</AxisX>

							<AllSeries Gallery="Area"></AllSeries>

							<LegendBox ContentLayout="Near" Dock="Top"></LegendBox>

							<MainPane AxisY-Title-Text="금액 (원)"></MainPane>
							<SpecialObjects>
								<chartfxadornments:SimpleBorder AssemblyName="ChartFX.WebForms.Adornments" Color="Transparent"
									Type="None">
								</chartfxadornments:SimpleBorder>
								<chartfxadornments:GradientBackground AssemblyName="ChartFX.WebForms.Adornments"
									ColorFrom="Transparent" EffectArea="0">
								</chartfxadornments:GradientBackground>
							</SpecialObjects>										
							<Series>
								<chartfx7:SeriesAttributes />
								<chartfx7:SeriesAttributes />
								<chartfx7:SeriesAttributes />
							</Series>
						</chartfx7:Chart>
					</td>
				</tr>
			</table>
			<!-- 챠트2 끝 -->
			<br>
			<!-- 챠트3 시작 -->
			<table id="table_chart_3" class="default" runat="server">
				<tr>
					<td><div class="sub_title_icon"><asp:Literal id="ltr_stitle_account_chart" Text="계정별총액챠트" runat="server" /></div></td>
				</tr>
				<tr>
					<td class="td_box">
						<chartfx7:Chart ID="chart_mline_account" runat="server" Height="480px" Palette="ChartFX6.ChartFX6" Width="1000px" ImageSettings-Interactive="False">
							<AxisY Title-Text="금액 (원)">
								<Grids Major-Style="Dash" Interlaced="True"></Grids>
								<LabelsFormat CustomFormat="###,###,##0" />
							</AxisY>

							<AxisX Title-Text="">
							<Grids Major-Visible="False"></Grids>
							</AxisX>

							<AllSeries PointLabels-Visible="True"></AllSeries>

							<LegendBox ContentLayout="Near" Dock="Bottom"></LegendBox>

							<MainPane AxisY-Title-Text="금액 (원)"></MainPane>
							<SpecialObjects>
								<chartfxadornments:SimpleBorder AssemblyName="ChartFX.WebForms.Adornments" Color="Transparent"
									Type="None">
								</chartfxadornments:SimpleBorder>
								<chartfxadornments:GradientBackground AssemblyName="ChartFX.WebForms.Adornments"
									ColorFrom="Transparent" EffectArea="0">
								</chartfxadornments:GradientBackground>
							</SpecialObjects>										
							<Series>
								<chartfx7:SeriesAttributes />
								<chartfx7:SeriesAttributes />
								<chartfx7:SeriesAttributes />
							</Series>
						</chartfx7:Chart>
					</td>
				</tr>
			</table>
			<!-- 챠트3 끝 -->
			<br>
			<!-- 챠트4 시작 -->
			<table id="table_chart_4" class="default" runat="server">
				<tr>
					<td><div class="sub_title_icon"><asp:Literal id="ltr_stitle_account_pie_chart" Text="계정별분포도" runat="server" /></div></td>
				</tr>
				<tr>
					<td class="td_box">
						<chartfx7:Chart ID="chart_pie_account" runat="server" Palette="DarkPastels.Pastels" Height="400px" ImageSettings-Interactive="False" Width="1000px">
							<AxisY Title-Text="">
								<Grids Major-Style="Solid" Interlaced="True"></Grids>
								<LabelsFormat CustomFormat="###,###,##0" />
							</AxisY>

							<AxisX Title-Text="">
							<Grids Major-Visible="False"></Grids>
							</AxisX>

							<AllSeries Gallery="Pie" PointLabels-BackColor="Transparent" PointLabels-Visible="True"></AllSeries>

							<LegendBox Dock="Right"></LegendBox>

							<MainPane AxisY-Title-Text=""></MainPane>
							<SpecialObjects>
								<chartfxadornments:SimpleBorder AssemblyName="ChartFX.WebForms.Adornments" Color="Transparent"
									Type="None">
								</chartfxadornments:SimpleBorder>
								<chartfxadornments:GradientBackground AssemblyName="ChartFX.WebForms.Adornments"
									ColorFrom="Transparent" EffectArea="0">
								</chartfxadornments:GradientBackground>
								<chartfx7galleries:Pie ExplodingMode="All" Shadows="True" SliceSeparation="10">
								</chartfx7galleries:Pie>
							</SpecialObjects>										
							<View3D Enabled="True" />
							<Series>
								<chartfx7:SeriesAttributes MarkerStep="3" />
								<chartfx7:SeriesAttributes />
								<chartfx7:SeriesAttributes />
							</Series>
						</chartfx7:Chart>
					</td>
				</tr>
			</table>
			<!-- 챠트4 끝 -->
			<!-- 리스트셋 시작 -->
			<!-- 리스트셋 끝 -->
			<!-- 카피라이트 시작 -->
			<ucCopyright:Copyright id="Copyright" runat="server"></ucCopyright:Copyright>
			<!-- 카피라이트 끝 -->
			<!-- 히든값 시작 -->
			<div id="hdn_data">
			<asp:label id="lbl_pk" runat="server"></asp:label>
			<asp:Label id="lbl_search_flag" runat="server"></asp:Label>
			</div>
			<div id="div_crd_img" style="position:absolute; left:1px; top:1px; width:180px; height:120px; z-index:1; border-style:none;display:none;" />
			<!-- 히든값 끝 -->
			</ContentTemplate>
			</asp:UpdatePanel>
			<!-- AJAX 끝 -->
		</td>
	</tr>
</table>

<asp:updateprogress AssociatedUpdatePanelID="UpdatePanel1" ID="updateProgress" runat="server">
	<progresstemplate>
		<div id="progressBackgroundFilter"></div>
		<div id="processMessage">
			<div id="processing"></div>
			<img src="../Common/Images/processing_img.gif" />
		</div>
	</progresstemplate>
</asp:updateprogress>

</form>
<script type="text/javascript" language="javascript" defer="defer">
	//검색
	function chkSearch() {
		var lb_checked_card = false;
		var lb_checked_account = false;
		
		//체크박스 갯수
		var cb_cnt_card = getCheckBoxCntOnTable("cbl_search_card_cd");
		var cb_cnt_account = getCheckBoxCntOnTable("cbl_search_account");
				
		//카드체크여부
		for (var i=0; i<cb_cnt_card; i++) {
			var cb = $("cbl_search_card_cd_"+i);
			if (cb.checked) {
				lb_checked_card = true;
			}
		}
		
		for (var i=0; i<cb_cnt_account; i++){
			var cb = $("cbl_search_account_"+i);
			if (cb.checked) {
				lb_checked_account = true;
			}
		}
		
		if (!lb_checked_card){
			msgBox.alert(getMsg(MSG_ERR_023)); //하나이상의 카드를 선택하세요
			return false;
		}
		
		if (!lb_checked_account){
			msgBox.alert(getMsg(MSG_ERR_101)); //하나이상의 계정을 선택하세요
			return false;
		}
		
		//검색기간
		var from_dt = $F("ddl_search_from_year") + $F("ddl_search_from_month");
		var to_dt = $F("ddl_search_to_year") + $F("ddl_search_to_month");
		
		// 검색기간
		if(!isDateSeq(from_dt, to_dt)) {
			msgBox.alert(getMsg(MSG_ERR_022)); //시작일자가 종료일자보다 늦을수 없습니다
			return false;
		}
		
		return true;
	}

	//카드명에 마우스 올리면 이미지 보여주기
	//function showCardImage(file_nm) {
	//	var img = $("div_crd_img");
	//	img.style.posLeft = event.x + document.body.scrollLeft;
	//	img.style.posTop = event.y + document.body.scrollTop;

	//	//이미지 보여주기
	//	img.innerHTML = "<img src='../Common/Upload/" + file_nm + "' width='120' height='80' />";
	//	img.show();
	//}

	//이미지 숨기기
	//function hideCardImage() {
	//	var img = $("div_crd_img");
	//	img.innerHTML = "";
	//	img.hide();
	//}
	
</script>


</body>
</html>